\hypertarget{class_robot_subsystem}{\section{Robot\-Subsystem Class Reference}
\label{class_robot_subsystem}\index{Robot\-Subsystem@{Robot\-Subsystem}}
}


{\ttfamily \#include $<$Robot\-Subsystem.\-hpp$>$}

Inheritance diagram for Robot\-Subsystem\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=5.000000cm]{class_robot_subsystem}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{class_robot_subsystem_1_1_action}{Action}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_robot_subsystem_a1da520892f6bc3bec0a8bbbd974a9486}{Robot\-Subsystem} ()
\item 
virtual \hyperlink{class_robot_subsystem_a76b7fadef83febf4ac9193d4892930c4}{$\sim$\-Robot\-Subsystem} ()
\item 
void \hyperlink{class_robot_subsystem_a2ed521eac330d9892c5efcd801ac3474}{Stop} ()
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{class_robot_subsystem_a7066b5d072b9ff707aabad9c46fcdc55}{Handle\-Periodic} ()
\item 
virtual void \hyperlink{class_robot_subsystem_a5e7a5b4382c3c6e8c0ead39f8fbed87d}{Handle\-Awake} ()
\item 
virtual void \hyperlink{class_robot_subsystem_a27e1d6644dbf38a6a056abafa08980e8}{Handle\-Stop} ()=0
\item 
\hypertarget{class_robot_subsystem_addfdd3a13805c1c08d2096541567f063}{bool {\bfseries Get\-Is\-Awake} () const }\label{class_robot_subsystem_addfdd3a13805c1c08d2096541567f063}

\item 
void \hyperlink{class_robot_subsystem_ab307ef887a2a864004b407379aefbbe6}{Awake} ()
\item 
void \hyperlink{class_robot_subsystem_a20f2f77ab45ba583b019a786baa2d402}{Sleep} ()
\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_robot_subsystem_af45e8a01b72511d7dc39a93fdbeada29}{class {\bfseries Systematic\-Robot}}\label{class_robot_subsystem_af45e8a01b72511d7dc39a93fdbeada29}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \hyperlink{class_robot_subsystem}{Robot\-Subsystem} class is a base class for classes that represent a subsystem of the robot.

A subsystem usually represents a mechanism on the physical robot. (e.\-g. A \hyperlink{class_drive_subsystem}{Drive\-Subsystem} would represent the drive train.)

To use it, create subclasses that override Handle\-Periodic, Handle\-Stop, and (optionally) Handle\-Awake functions. Then, create functions that control the subsystem that to be called by external Services or internal Operations.

Every \hyperlink{class_robot_subsystem}{Robot\-Subsystem} must be added to the \hyperlink{class_systematic_robot}{Systematic\-Robot}, which will call the event handling functions at the correct times.

Subsystems can be set asleep by calling Sleep to save processing time. While asleep, Handle\-Periodic will not be called and no Operations can be run within it. Use the Awake function to exit this sleep mode.

Testing shows this class works. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_robot_subsystem_a1da520892f6bc3bec0a8bbbd974a9486}{\index{Robot\-Subsystem@{Robot\-Subsystem}!Robot\-Subsystem@{Robot\-Subsystem}}
\index{Robot\-Subsystem@{Robot\-Subsystem}!RobotSubsystem@{Robot\-Subsystem}}
\subsubsection[{Robot\-Subsystem}]{\setlength{\rightskip}{0pt plus 5cm}Robot\-Subsystem\-::\-Robot\-Subsystem (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_robot_subsystem_a1da520892f6bc3bec0a8bbbd974a9486}
Constructor for \hyperlink{class_robot_subsystem}{Robot\-Subsystem}. \hypertarget{class_robot_subsystem_a76b7fadef83febf4ac9193d4892930c4}{\index{Robot\-Subsystem@{Robot\-Subsystem}!$\sim$\-Robot\-Subsystem@{$\sim$\-Robot\-Subsystem}}
\index{$\sim$\-Robot\-Subsystem@{$\sim$\-Robot\-Subsystem}!RobotSubsystem@{Robot\-Subsystem}}
\subsubsection[{$\sim$\-Robot\-Subsystem}]{\setlength{\rightskip}{0pt plus 5cm}Robot\-Subsystem\-::$\sim$\-Robot\-Subsystem (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_robot_subsystem_a76b7fadef83febf4ac9193d4892930c4}
Destructor for \hyperlink{class_robot_subsystem}{Robot\-Subsystem}. 

\subsection{Member Function Documentation}
\hypertarget{class_robot_subsystem_ab307ef887a2a864004b407379aefbbe6}{\index{Robot\-Subsystem@{Robot\-Subsystem}!Awake@{Awake}}
\index{Awake@{Awake}!RobotSubsystem@{Robot\-Subsystem}}
\subsubsection[{Awake}]{\setlength{\rightskip}{0pt plus 5cm}void Robot\-Subsystem\-::\-Awake (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{class_robot_subsystem_ab307ef887a2a864004b407379aefbbe6}
Awake the subsystem to reenable the periodic loop handler. \hypertarget{class_robot_subsystem_a5e7a5b4382c3c6e8c0ead39f8fbed87d}{\index{Robot\-Subsystem@{Robot\-Subsystem}!Handle\-Awake@{Handle\-Awake}}
\index{Handle\-Awake@{Handle\-Awake}!RobotSubsystem@{Robot\-Subsystem}}
\subsubsection[{Handle\-Awake}]{\setlength{\rightskip}{0pt plus 5cm}void Robot\-Subsystem\-::\-Handle\-Awake (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}}\label{class_robot_subsystem_a5e7a5b4382c3c6e8c0ead39f8fbed87d}
This function should be overridden to handle the subsystem awakening (when Awake function is called). 

Reimplemented in \hyperlink{class_tank_drive_subsystem_ae91788bb584fba841a4322e4ab533303}{Tank\-Drive\-Subsystem}.

\hypertarget{class_robot_subsystem_a7066b5d072b9ff707aabad9c46fcdc55}{\index{Robot\-Subsystem@{Robot\-Subsystem}!Handle\-Periodic@{Handle\-Periodic}}
\index{Handle\-Periodic@{Handle\-Periodic}!RobotSubsystem@{Robot\-Subsystem}}
\subsubsection[{Handle\-Periodic}]{\setlength{\rightskip}{0pt plus 5cm}void Robot\-Subsystem\-::\-Handle\-Periodic (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}}\label{class_robot_subsystem_a7066b5d072b9ff707aabad9c46fcdc55}
This function should be overridden to handle periodic subsystem tasks. It will be called periodically when subsystem is added to robot. 

Reimplemented from \hyperlink{class_subscriber_a6ffeb82e812ef06db4aff08ee01d427b}{Subscriber}.



Reimplemented in \hyperlink{class_tank_drive_subsystem_ab834b550c5bc2aa5ea164201287a3ebf}{Tank\-Drive\-Subsystem}, and \hyperlink{class_mecanum_drive_subsystem_adf2c3d907fc8271f70dee8eb3be2576f}{Mecanum\-Drive\-Subsystem}.

\hypertarget{class_robot_subsystem_a27e1d6644dbf38a6a056abafa08980e8}{\index{Robot\-Subsystem@{Robot\-Subsystem}!Handle\-Stop@{Handle\-Stop}}
\index{Handle\-Stop@{Handle\-Stop}!RobotSubsystem@{Robot\-Subsystem}}
\subsubsection[{Handle\-Stop}]{\setlength{\rightskip}{0pt plus 5cm}virtual void Robot\-Subsystem\-::\-Handle\-Stop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [pure virtual]}}}\label{class_robot_subsystem_a27e1d6644dbf38a6a056abafa08980e8}
This function must be overridden to disable this subsystem.

It must be implimented such that\-:
\begin{DoxyItemize}
\item All contained actuators will stop.
\item The subsystem can be stopped again even after it has been stopped.
\item Actuators will stay powerless until an \hyperlink{class_robot_subsystem_1_1_action}{Action} function (a public function) has been called.
\item If the subsystem has already been stopped and an \hyperlink{class_robot_subsystem_1_1_action}{Action} function has not been called, stopping the subsystem will not result in powered actuator activity. 
\end{DoxyItemize}

Implemented in \hyperlink{class_tank_drive_subsystem_a55532e7537d8f4aa680499fd84483ab7}{Tank\-Drive\-Subsystem}.

\hypertarget{class_robot_subsystem_a20f2f77ab45ba583b019a786baa2d402}{\index{Robot\-Subsystem@{Robot\-Subsystem}!Sleep@{Sleep}}
\index{Sleep@{Sleep}!RobotSubsystem@{Robot\-Subsystem}}
\subsubsection[{Sleep}]{\setlength{\rightskip}{0pt plus 5cm}void Robot\-Subsystem\-::\-Sleep (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [protected]}}}\label{class_robot_subsystem_a20f2f77ab45ba583b019a786baa2d402}
Stop the subsystem and set it asleep to disable the periodic loop handler. \hypertarget{class_robot_subsystem_a2ed521eac330d9892c5efcd801ac3474}{\index{Robot\-Subsystem@{Robot\-Subsystem}!Stop@{Stop}}
\index{Stop@{Stop}!RobotSubsystem@{Robot\-Subsystem}}
\subsubsection[{Stop}]{\setlength{\rightskip}{0pt plus 5cm}void Robot\-Subsystem\-::\-Stop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_robot_subsystem_a2ed521eac330d9892c5efcd801ac3474}
Stops the subsystem, which should stop sending power to contained actuators until an \hyperlink{class_robot_subsystem_1_1_action}{Action} function is called. 

The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
C\-:/\-Users/\-Sam/\-Projects/\-F\-R\-C/\-Libraries/\-Fpk/\-Entech-\/\-Fpk-\/\-Subscribers/\-Entech-\/\-Fpk/\-Subsystems/Robot\-Subsystem.\-hpp\item 
C\-:/\-Users/\-Sam/\-Projects/\-F\-R\-C/\-Libraries/\-Fpk/\-Entech-\/\-Fpk-\/\-Subscribers/\-Entech-\/\-Fpk/\-Subsystems/Robot\-Subsystem.\-cpp\end{DoxyCompactItemize}
